package com.nested;

public class LocalInner {

    //局部内部类
    private int a = 1;
    private static int b =2;

    public void test(){
        final  int c =3;

        class InLocalInner{

            public void add1(){

                System.out.println("a="+a);
                System.out.println("b="+b);
                System.out.println("c="+c);

            }
        }

        new InLocalInner().add1();
    }

    static public void test2(){

        final int d = 5;
        class InLocalInner2{

            public void add1(){

                System.out.println("b="+b);
                System.out.println("c="+d);
            }
        }

        new InLocalInner2().add1();
    }

    public static void main(String[] args) {

        new LocalInner().test();
        LocalInner.test2();
    }

}
